Skip to content

Conversation

robertky
Copy link
Member

Closes #104

What was done

  • Moved the genre, decade, artist-country and review filters into a responsive side drawer, using a native modal dialog with a full-screen layout on narrow viewports.
  • Kept active filter chips, the filter count and result summary visible when the drawer is closed. Search, sort and filter URL state continue to work as before.
  • Added keyboard and screen-reader support: focus moves into the drawer and returns to its trigger, Escape closes it, background scrolling is locked while open, and the active filter count is announced.
  • Updated interaction tests and added Playwright coverage for desktop/mobile layout, keyboard operation and URL state.

What was tested

  • pnpm format:check && pnpm lint && pnpm typecheck && pnpm test && pnpm build — passed. Client: 204 tests passed; server: 82 passed, 56 PostgreSQL tests skipped in the default local run. Client JS bundle: 385.95 kB, under the 512 kB budget.
  • pnpm --filter @t19/e2e typecheck — passed.
  • The new Playwright browser tests were not run locally; CI will run them against its browser environment.

@robertky robertky requested a review from a team as a code owner November 20, 2026 18:54
Copy link
Member

@erikhfj erikhfj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean implementation using native <dialog> + plain CSS, and the focus management (Close filters on open, onCancel handling for Escape, focus restoration to the Filters button, zero-count uncheck focus fallback, and document.body.style.overflow cleanup) looks solid.

A couple of items before approving:

  1. Playwright E2E tests have not run yet: The PR description notes that CI will run the new Playwright tests, but .github/workflows/ci.yml only runs unit tests and PostgreSQL integration tests — there is no pnpm test:e2e job in CI. Since jsdom mocks showModal()/close(), e2e/tests/filters.spec.ts (especially the real top-layer Shift+Tab focus-containment assertion) and the updated e2e/tests/search.spec.ts haven't actually executed yet. Could you run pnpm test:e2e locally against a seeded stack and confirm it passes?
  2. Backdrop click to close: .filter-options::backdrop dims the background (rgb(0 0 0 / 45%)), but clicking outside the drawer currently does nothing. Adding a backdrop click handler (e.g. closing when clicking outside the dialog's bounding box or on the <dialog> element itself with an inner content wrapper) would match user expectations on desktop.

Minor nits:

  • JSDoc in client/src/components/FilterPanel.tsx reads "so the panel only opens as a modal side drawer" (leftover "only" from the previous sentence).
  • In client/src/App.test.tsx, the narrowed resultStatus() regex omits ^Retrying albums, ^Could not load albums\., and ^Loading more albums (passes today, just slightly brittle if future tests assert those states).
  • If AI assisted with this PR, remember to add a row in docs/AI-USAGE.md.

@robertky robertky force-pushed the feat/104-filter-side-panel branch 2 times, most recently from 719beb7 to 96e60ba Compare November 20, 2026 21:18
@robertky robertky force-pushed the feat/104-filter-side-panel branch from 96e60ba to f28aed1 Compare November 22, 2026 20:14
Copy link
Member

@erikhfj erikhfj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All follow-up items look solid: native <dialog> side drawer with backdrop dismissal, Tab/Shift+Tab focus loop, focus restoration to the trigger and Close filters fallback on zero-count/hidden uncheck, body scroll lock cleanup, reconciled with #101's country preview, and Playwright coverage for both desktop and mobile viewports. CI is green — approving!

@erikhfj erikhfj merged commit b92ef7b into main Nov 23, 2026
3 checks passed
@erikhfj erikhfj deleted the feat/104-filter-side-panel branch November 23, 2026 19:15
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move album filters into a side panel
2 participants